#pragma once

#include "c99defs.hpp"
#ifdef __cplusplus
extern "C" {
#endif

struct cat_process_pipe;
typedef struct cat_process_pipe cat_process_pipe_t;

EXPORT cat_process_pipe_t *cat_process_pipe_create(const char *cmd_line,const char *type);

EXPORT int cat_process_pipe_destroy(cat_process_pipe_t*pp);

EXPORT size_t cat_process_pipe_read(cat_process_pipe_t*pp, uint8_t *data,size_t len);

EXPORT size_t cat_process_pipe_read_err(cat_process_pipe_t*pp, uint8_t *data,size_t len);

EXPORT size_t cat_process_pipe_write(cat_process_pipe_t*pp, const uint8_t *data,size_t len);

#ifdef __cplusplus
}
#endif